]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Remove clutter constraints from the code
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 26 Aug 2013 19:43:27 +0000 (15:43 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 26 Aug 2013 23:05:15 +0000 (19:05 -0400)
These cause annoying allocation cycle warnings, and it's simpler to
just express our desired layout in terms of nested containers.
Adapt the theme to match as well.

https://bugzilla.gnome.org/show_bug.cgi?id=706843

data/theme/gnome-shell.css
js/ui/unlockDialog.js

index 822401d1c47f8095c10a56c821abca1a46f3737d..683e3034effd1c6a069843a36221db1c609fc5f2 100644 (file)
@@ -2258,14 +2258,6 @@ StScrollBar StButton#vhandle:active {
     /* Reset border and background */
     border: none;
     background-color: transparent;
-
-    padding-bottom: 80px;
-    padding-top: 80px;
-
-    border-radius: 16px;
-    min-height: 150px;
-    max-height: 700px;
-    min-width: 350px;
 }
 
 .login-dialog-button-box {
index b0d342b9eeab080575d17c8038ab8ba9704f50a1..d43df839aa758aa8c8a8f4599a785e717ad82ec9 100644 (file)
@@ -34,6 +34,7 @@ const UnlockDialog = new Lang.Class({
     _init: function(parentActor) {
         this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
                                      style_class: 'login-dialog',
+                                     layout_manager: new Clutter.BoxLayout(),
                                      visible: false });
 
         this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
@@ -43,11 +44,12 @@ const UnlockDialog = new Lang.Class({
         this._userName = GLib.get_user_name();
         this._user = this._userManager.get_user(this._userName);
 
-        this._promptBox = new St.BoxLayout({ vertical: true });
+        this._promptBox = new St.BoxLayout({ vertical: true,
+                                             x_align: Clutter.ActorAlign.CENTER,
+                                             y_align: Clutter.ActorAlign.CENTER,
+                                             x_expand: true,
+                                             y_expand: true });
         this.actor.add_child(this._promptBox);
-        this._promptBox.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
-                                                                     align_axis: Clutter.AlignAxis.BOTH,
-                                                                     factor: 0.5 }));
 
         this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
         this._authPrompt.connect('failed', Lang.bind(this, this._fail));